// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_FIN_SUPPLIER_ACCOUNT_ITEM
// * CreateDate    : 2012/2/2 10:17:12
// * Creater       : CodeSmith
// * LastChangeDate: 2012/2/2 10:17:12
// * LastChanger   : 2012/2/2 10:17:12
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
	[Serializable]
	public partial class FinSupplierAccountItemEntity : EntityBase
    {
        public FinSupplierAccountItemTable TableSchema
        {
            get
            {
                return FinSupplierAccountItemTable.Current;
            }
		}
		
		public FinSupplierAccountItemEntity()
        {

        }
		
		public FinSupplierAccountItemEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.SupplierAccountItemId = Convert.ToString(CommonFunctions.ToObject(dr["SUPPLIER_ACCOUNT_ITEM_ID"]));
			this.SupplierId = Convert.ToString(CommonFunctions.ToObject(dr["SUPPLIER_ID"]));
			this.AmountDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["AMOUNT_DATE"]));
			this.AmountPerson = Convert.ToString(CommonFunctions.ToObject(dr["AMOUNT_PERSON"]));
			this.PurchaseOrderAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["PURCHASE_ORDER_AMOUNT"]));
			this.BillingAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["BILLING_AMOUNT"]));
			this.PaidAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["PAID_AMOUNT"]));
			this.PayableAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["PAYABLE_AMOUNT"]));
			this.ArrivedAmountNoBilling = Convert.ToDecimal(CommonFunctions.ToObject(dr["ARRIVED_AMOUNT_NO_BILLING"]));
			this.ArrivedAmountBilled = Convert.ToDecimal(CommonFunctions.ToObject(dr["ARRIVED_AMOUNT_BILLED"]));
			this.RelatedOrderId = Convert.ToString(CommonFunctions.ToObject(dr["RELATED_ORDER_ID"]));
			this.RelatedOrderCode = Convert.ToString(CommonFunctions.ToObject(dr["RELATED_ORDER_CODE"]));
        }
		
		public FinSupplierAccountItemEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.SupplierAccountItemId = Convert.ToString(CommonFunctions.ToObject(dr["SUPPLIER_ACCOUNT_ITEM_ID"]));
			this.SupplierId = Convert.ToString(CommonFunctions.ToObject(dr["SUPPLIER_ID"]));
			this.AmountDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["AMOUNT_DATE"]));
			this.AmountPerson = Convert.ToString(CommonFunctions.ToObject(dr["AMOUNT_PERSON"]));
			this.PurchaseOrderAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["PURCHASE_ORDER_AMOUNT"]));
			this.BillingAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["BILLING_AMOUNT"]));
			this.PaidAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["PAID_AMOUNT"]));
			this.PayableAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["PAYABLE_AMOUNT"]));
			this.ArrivedAmountNoBilling = Convert.ToDecimal(CommonFunctions.ToObject(dr["ARRIVED_AMOUNT_NO_BILLING"]));
			this.ArrivedAmountBilled = Convert.ToDecimal(CommonFunctions.ToObject(dr["ARRIVED_AMOUNT_BILLED"]));
			this.RelatedOrderId = Convert.ToString(CommonFunctions.ToObject(dr["RELATED_ORDER_ID"]));
			this.RelatedOrderCode = Convert.ToString(CommonFunctions.ToObject(dr["RELATED_ORDER_CODE"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return FinSupplierAccountItemTable.Current;
            }
        }
		
		#region Perporty List
        public string SupplierAccountItemId
        {
            get { return Convert.ToString(GetData(FinSupplierAccountItemTable.C_SUPPLIER_ACCOUNT_ITEM_ID)); }
            set { SetData(FinSupplierAccountItemTable.C_SUPPLIER_ACCOUNT_ITEM_ID, value); }
        }
		
        public string SupplierId
        {
            get { return Convert.ToString(GetData(FinSupplierAccountItemTable.C_SUPPLIER_ID)); }
            set { SetData(FinSupplierAccountItemTable.C_SUPPLIER_ID, value); }
        }
		
        public DateTime AmountDate
        {
            get { return Convert.ToDateTime(GetData(FinSupplierAccountItemTable.C_AMOUNT_DATE)); }
            set { SetData(FinSupplierAccountItemTable.C_AMOUNT_DATE, value); }
        }
		
        public string AmountPerson
        {
            get { return Convert.ToString(GetData(FinSupplierAccountItemTable.C_AMOUNT_PERSON)); }
            set { SetData(FinSupplierAccountItemTable.C_AMOUNT_PERSON, value); }
        }
		
        public decimal PurchaseOrderAmount
        {
            get { return Convert.ToDecimal(GetData(FinSupplierAccountItemTable.C_PURCHASE_ORDER_AMOUNT)); }
            set { SetData(FinSupplierAccountItemTable.C_PURCHASE_ORDER_AMOUNT, value); }
        }
		
        public decimal BillingAmount
        {
            get { return Convert.ToDecimal(GetData(FinSupplierAccountItemTable.C_BILLING_AMOUNT)); }
            set { SetData(FinSupplierAccountItemTable.C_BILLING_AMOUNT, value); }
        }
		
        public decimal PaidAmount
        {
            get { return Convert.ToDecimal(GetData(FinSupplierAccountItemTable.C_PAID_AMOUNT)); }
            set { SetData(FinSupplierAccountItemTable.C_PAID_AMOUNT, value); }
        }
		
        public decimal PayableAmount
        {
            get { return Convert.ToDecimal(GetData(FinSupplierAccountItemTable.C_PAYABLE_AMOUNT)); }
            set { SetData(FinSupplierAccountItemTable.C_PAYABLE_AMOUNT, value); }
        }
		
        public decimal ArrivedAmountNoBilling
        {
            get { return Convert.ToDecimal(GetData(FinSupplierAccountItemTable.C_ARRIVED_AMOUNT_NO_BILLING)); }
            set { SetData(FinSupplierAccountItemTable.C_ARRIVED_AMOUNT_NO_BILLING, value); }
        }
		
        public decimal ArrivedAmountBilled
        {
            get { return Convert.ToDecimal(GetData(FinSupplierAccountItemTable.C_ARRIVED_AMOUNT_BILLED)); }
            set { SetData(FinSupplierAccountItemTable.C_ARRIVED_AMOUNT_BILLED, value); }
        }
		
        public string RelatedOrderId
        {
            get { return Convert.ToString(GetData(FinSupplierAccountItemTable.C_RELATED_ORDER_ID)); }
            set { SetData(FinSupplierAccountItemTable.C_RELATED_ORDER_ID, value); }
        }
		
        public string RelatedOrderCode
        {
            get { return Convert.ToString(GetData(FinSupplierAccountItemTable.C_RELATED_ORDER_CODE)); }
            set { SetData(FinSupplierAccountItemTable.C_RELATED_ORDER_CODE, value); }
        }
		
		#endregion
	}
	
	
}	

